package com.luo.chengrui.module.sa.api.org;


import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import com.luo.chengrui.module.sa.ApiConstants;
import com.luo.chengrui.module.sa.api.org.dto.OrgRespDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO fallbackFactory =
@Tag(name = "RPC 服务 - 矩阵API")
public interface SaOrgMatrixApi {

    /**
     * 获取组织下级所有人员信息。
     *
     * @param orgId
     * @return
     */
    String PREFIX = ApiConstants.PREFIX + "/matrix";

    @GetMapping(PREFIX + "/org/getpsm")
    @Operation(summary = "获取组织管理矩阵人员")
    @Parameter(name = "orgId", description = "组织ID", example = "331b5627cf338d4ecc3d5a5ca38e3bd3", required = true)
    @Parameter(name = "orgManagerDefineId", description = "组织岗位定义编号", example = "responsibility", required = true)
    CommonResult<List<OrgRespDTO>> getOrgManagerMatrixPerson(@RequestParam("orgId") String orgId, @RequestParam("orgManagerDefineId") String orgManagerDefineId);

    @GetMapping(PREFIX + "/biz/getpsm")
    @Operation(summary = "获取职能矩阵人员")
    @Parameter(name = "id", description = "职能岗位ID", example = "331b5627cf338d4ecc3d5a5ca38e3bd3", required = true)
    CommonResult<List<OrgRespDTO>> getBizManagerMatrixPerson(@RequestParam("id") String id);


}
